//
//  LMAVManager.h
//  EPA
//
//  Created by lanou3g on 16/4/21.
//  Copyright © 2016年 liman. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>

typedef NS_ENUM(NSInteger , PlayStye) {
    PlayStyeSingle,
    PlayStyeRandom,
    PlayStyeList
};

typedef NS_ENUM(NSInteger,PlayerState) {
    PlayerStatePlay,//0
    PlayerStatePause//1
};
@interface LMAVManager : NSObject
///播放模式
@property(nonatomic, assign) PlayStye playStye;
///播放状态
@property(nonatomic, assign) PlayerState playerState;
///播放器
@property (nonatomic, strong, readonly)AVPlayer *player;
///播放列表
@property (nonatomic, strong) NSMutableArray *itemArray;
///当前播放歌曲下标
@property (nonatomic, assign)NSInteger currentIndex;

///播放
- (void)play;

///暂停
- (void)pause;

///停止
- (void)stop;

///跳转进度
- (void)seekToTime:(CMTime)time;

///上一曲
- (void)previous;

///下一曲
- (void)next;

///单利方法
+ (instancetype)shareManager;

@property (nonatomic, assign ,readonly) float totalTime;
@property (nonatomic, assign ,readonly) float currentTime;

- (void)playerDidFinishTotalTime:(float )time;
@end
